using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Common.Utilities.Dispatcher;

namespace Workflows.Components.Reports
{
    public partial class ReportBuilderEditor : Form, IComponentEditor 
    {
        private object _OwnerActivityNode;
        private ReportBuilder _ReportBuilder;

        public ReportBuilderEditor()
        {
            InitializeComponent();
        }

        private void ReportBuilderEditor_Load(object sender, EventArgs e)
        {

        }

        public event UpdateComponentSettings UpdateComponentSettingEvent;

        public object OwnerActivityNode
        {
            get { return _OwnerActivityNode; }
            set { _OwnerActivityNode = value; }
        }

        public Type WorkflowComponentType
        {
            get { return typeof(ReportBuilder); }
        }

        public void LoadSettings(GlobalVariable[] globalVars, WorkflowComponentBase[] fromComponents,
                                 object activityNode, WorkflowComponentBase wfComponent)
        {
            this._OwnerActivityNode = activityNode;
            this._ReportBuilder = (ReportBuilder) wfComponent;
        }

        public void SaveSettings()
        {
            
        }

        public TestResult Test()
        {
            return new TestResult(true, string.Empty);
        }
    }
}